import * as echarts from 'echarts';



export function toggleTheme(themeName: string) {
  fetch(`/echarts/${themeName}.json`)
  .then(r => r.json())
  .then(theme => {
    echarts.registerTheme(themeName, theme);
  })

}